//
//  PKReadingCollectionViewCell.m
//  PianKe
//
//  Created by mingtao on 15/10/9.
//  Copyright (c) 2015年 mingtao. All rights reserved.
//

#import "PKReadingCollectionViewCell.h"
#import <UIImageView+WebCache.h>
#import <UIButton+WebCache.h>

#import "PKReadingModelList.h"

@implementation PKReadingCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    
    if (self) {
        _ButImage = [[UIImageView alloc]init];
        
        _ButImage.frame = CGRectMake(0, 0,self.frame.size.width ,self.frame.size.height);
        
        [self.contentView addSubview:_ButImage];
        
        _lableImage = [[UILabel alloc]initWithFrame:CGRectMake(0, 90, WIHES, 30)];
        
        _lableImage.textColor = [UIColor whiteColor];
        _lableImage.font = [UIFont systemFontOfSize:14];
        
        [self.contentView addSubview:_lableImage];
    }
    return self;
}

-(void)setReadlist:(PKReadingModelList *)Readlist
{
    _Readlist = Readlist;
//((PKReadingModelList *)Readlist.list[i]).coverimg
//    for (int i = 0; i<Readlist.list.count; i++) {
       // [_ButImage sd_setBackgroundImageWithURL:[NSURL URLWithString:Readlist.coverimg] forState:(UIControlStateNormal)];
    [_ButImage sd_setImageWithURL:[NSURL URLWithString:Readlist.coverimg]];
    
    
        _lableImage.text =[NSString stringWithFormat:@"%@ %@",Readlist.name,Readlist.enname];
//    }

}

@end
